home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993 October: Windmill on DISC / ADC Developer CD (1993-10) (''Windmill On DISC'')_iso / Dev.CD Oct 93.iso / Utilities / Installer v3.4.3 / Examples - Installer 3.4 / SimpleCustomOnly.r < prev    next >
Encoding:
Text File  |  1993-06-15  |  4.0 KB  |  108 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2.  *
  3.  *    Apple Macintosh Developer Technical Support
  4.  *
  5.  *  Installer 3.2 sample: very simple installation (Custom Installation only)
  6.  *
  7.  *    File:        SimpleCustomOnly.r -    Rez Source
  8.  *
  9.  *  Modifications:
  10.  *        5/19/93: RRK Changed Target file spec typeCrMustMatch flag setting to
  11.  *                        typeCrNeedNotMatch and included comment that this will
  12.  *                        allow the replacement of the target file if for some reason
  13.  *                        the file or creator are different.
  14.  *                     Used InstallerCommon.r defines.
  15.  *
  16.  *    by:            Jon Zap
  17.  *  updated for use with Installer 3.4 by: Rich Kubota 9/1/92
  18.  *
  19.  *    Copyright © 1991 Apple Computer, Inc.
  20.  *    All rights reserved.
  21.  *
  22.  *------------------------------------------------------------------------------
  23.  *
  24.  * Install application "TheProgram" into the folder "Root":Installed Application
  25.  * It demonstrates only Custom Installation (Easy Installation is not supported)
  26.  * Note: we are not recommending that you do a custom only installation; it is
  27.  * here to show what is needed for custom installation.  (The key point is that
  28.  * frameworks and rules do not apply)
  29.  *----------------------------------------------------------------------------*/
  30.  
  31. #include "InstallerTypes.r"
  32. #include "InstallerCommon.r"        /* list of macros to simplify list */
  33.  
  34. /* You can build and complete the script with the following lines:
  35. # Note: set up floppies with the appropriate names and contents before running scriptcheck
  36. # or set up folders with the same names and contents as the floppies
  37. # put these folders in the same folder as the script or at the root directory of same disk
  38.  
  39.     rez -o "SimpleCustomOnly" -t 'bbkr' -c 'bbkr' "SimpleCustomOnly.r"
  40.     setfile -a i "SimpleCustomOnly"        #mark Inited
  41.     scriptcheck -p "SimpleCustomOnly"
  42. */
  43.  
  44. /* Defines for the file spec atoms (specifications for source and destination files) */
  45. #define fsSourceProgram            2000
  46. #define fsTargetProgram            2001
  47.  
  48. /* This is the name of the source disk */
  49. #define ProgramDisk "Program Disk:"
  50.  
  51. /* This is the target path for where we want to install the file. */
  52. #define TargetPath    ":Installed Application:"
  53.  
  54. /* Definition for the package. */
  55. #define pkTheProgram            3000
  56.  
  57. /* Definition for the file atom */
  58. #define faProgram                4000
  59.  
  60. /***************************** Package Resources ************************************************/
  61. resource 'inpk' (pkTheProgram) {
  62.     format0 {
  63.         showsOnCustom,             /* Package appears in the Custom Install display */
  64.         removable,                /* Package can be removed */
  65.         dontForceRestart,        /* installing an app doesnt require rebooting */
  66.         0,                         /* 'icmt' not required */
  67.         0,                        /* Package size (filled in by ScriptCheck) */
  68.         "The Program", {        /* package name */
  69.             'infa', faProgram;
  70.         }
  71.     }
  72. };
  73.  
  74. /********************************************* File Specs ***************************************/
  75. /* Source File Specs */
  76. resource 'infs' (fsSourceProgram) {
  77.     'APPL',                                /* File Type */
  78.     'ttxt',                                /* Creator */
  79.     kScriptCheckSetsDate,                /* ScriptCheck will fill in the creation date */
  80.     noSearchForFile,                    /* Do not search the source disk for the file */
  81.     typeCrMustMatch,                    /* file type and creator on this file must match */
  82.     ProgramDisk"TeachText"                /* Path to the file */
  83. };
  84.  
  85. /* Target File Specs */
  86. resource 'infs' (fsTargetProgram) {
  87.     'APPL',                                /* File Type */
  88.     'ttxt',                                /* Creator */
  89.     kNoDateStampCheck,                    /* creation date must be zero for target file spec */
  90.     noSearchForFile,                    /* Do not search the target disk for the file */
  91.     typeCrNeedNotMatch,                    /* file to be replaced even if F&C don't match  */
  92.     TargetPath"TeachText"                /* installation Path */
  93. };
  94.  
  95. /******************************************** File Atoms ************************************************/
  96. resource 'infa' (faProgram) {
  97.     format0 {
  98.         StdRemLeaveNewerCopy,            /* see InstallerCommon.r */
  99.         fsTargetProgram,                /* TARGET file spec */
  100.         fsSourceProgram,                 /* SOURCE file spec */
  101.         0,                                /* atom size (filled in by ScriptCheck) */
  102.         ""                                /* Atom Description (for a file Installer will use file name) */
  103.     };
  104. };
  105.  
  106.  
  107.  
  108.